package net.yxsoft.websocket;

import io.netty.channel.Channel;
import io.netty.channel.group.ChannelGroup;
import net.yxsoft.websocket.handler.MessageServerHandler;
import rapid.netty.BaseWebSocketServerInitializer;
import rapid.netty.WebSocketServerConfig;

public class MessageServerInitializer extends BaseWebSocketServerInitializer<WebSocketServerConfig> {
    public MessageServerInitializer(ChannelGroup channelGroup, WebSocketServerConfig config) {
        super(channelGroup, config);
    }

    @Override
    protected void initChannels(Channel channel) {
        channel.pipeline().addLast(new MessageServerHandler(CHANNEL_GROUP, CONFIG.getCommandGroup()));
    }
}